package com.config;

import com.controller.vo.OrderItem;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Slf4j
@Configuration
public class StreamForOrderFunction {

    @Bean
    public java.util.function.Consumer<OrderItem> errorHandle(){
        return (OrderItem orderItem)->{
            // todo from try to get header.?
            log.warn(" rollback the  exception order"+orderItem+" , because of the payment failed ");
        };
    }
}
